home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 August: Tool Chest / Dev.CD Aug 94.toast / Tool Chest / Interfaces / MPW Interfaces / CIncludes / ENET.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-09-17  |  2.4 KB  |  99 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        ENET.h
  3.  
  4.     Copyright:    © 1983-1993 by Apple Computer, Inc.
  5.                 All rights reserved.
  6.  
  7.     Version:    System 7.1 for ETO #11
  8.     Created:    Tuesday, March 30, 1993 18:00
  9.  
  10. */
  11.  
  12. #ifndef __ENET__
  13. #define __ENET__
  14.  
  15. #ifndef __TYPES__
  16. #include <Types.h>
  17. #endif
  18.  
  19. #ifndef __OSUTILS__
  20. #include <OSUtils.h>
  21. #endif
  22.  
  23.  
  24. enum {
  25.  
  26.  ENetSetGeneral = 253,        /*Set "general" mode*/
  27.  ENetGetInfo = 252,            /*Get info*/
  28.  ENetRdCancel = 251,        /*Cancel read*/
  29.  ENetRead = 250,            /*Read*/
  30.  ENetWrite = 249,            /*Write*/
  31.  ENetDetachPH = 248,        /*Detach protocol handler*/
  32.  ENetAttachPH = 247,        /*Attach protocol handler*/
  33.  ENetAddMulti = 246,        /*Add a multicast address*/
  34.  ENetDelMulti = 245,        /*Delete a multicast address*/
  35.  
  36.  eLenErr = -92,                /*Length error ddpLenErr*/
  37.  eMultiErr = -91            /*Multicast address error ddpSktErr*/
  38.  
  39.  
  40. #define EAddrRType 'eadr'    /*Alternate address resource type*/
  41. };
  42.  
  43. #define EParamHeader \
  44.  QElem *qLink;                /*General EParams*/\
  45.  short qType;                /*queue type*/\
  46.  short ioTrap;                /*routine trap*/\
  47.  Ptr ioCmdAddr;                /*routine address*/\
  48.  ProcPtr ioCompletion;        /*completion routine*/\
  49.  OSErr ioResult;            /*result code*/\
  50.  StringPtr ioNamePtr;        /*->filename*/\
  51.  short ioVRefNum;            /*volume reference or drive number*/\
  52.  short ioRefNum;            /*driver reference number*/\
  53.  short csCode;                /*Call command code*/
  54.  
  55.  
  56. struct EParamMisc1 {
  57.  EParamHeader                 /*General EParams*/
  58.  short eProtType;            /*Ethernet protocol type*/
  59.  Ptr ePointer;
  60.  short eBuffSize;            /*buffer size*/
  61.  short eDataSize;            /*number of bytes read*/
  62. };
  63.  
  64. typedef struct EParamMisc1 EParamMisc1;
  65.  
  66. struct EParamMisc2 {
  67.  EParamMisc1 EParms1;
  68.  char eMultiAddr[6];        /*Multicast Address*/
  69. };
  70.  
  71. typedef struct EParamMisc2 EParamMisc2;
  72.  
  73. union EParamBlock {
  74.  EParamMisc1 EParms1;
  75.  EParamMisc2 EParms2;
  76. };
  77.  
  78. typedef union EParamBlock EParamBlock;
  79. typedef EParamBlock *EParamBlkPtr;
  80.  
  81.  
  82. #ifdef __cplusplus
  83. extern "C" {
  84. #endif
  85. pascal OSErr EWrite(EParamBlkPtr thePBptr,Boolean async); 
  86. pascal OSErr EAttachPH(EParamBlkPtr thePBptr,Boolean async); 
  87. pascal OSErr EDetachPH(EParamBlkPtr thePBptr,Boolean async); 
  88. pascal OSErr ERead(EParamBlkPtr thePBptr,Boolean async); 
  89. pascal OSErr ERdCancel(EParamBlkPtr thePBptr,Boolean async); 
  90. pascal OSErr EGetInfo(EParamBlkPtr thePBptr,Boolean async); 
  91. pascal OSErr ESetGeneral(EParamBlkPtr thePBptr,Boolean async); 
  92. pascal OSErr EAddMulti(EParamBlkPtr thePBptr,Boolean async); 
  93. pascal OSErr EDelMulti(EParamBlkPtr thePBptr,Boolean async); 
  94. #ifdef __cplusplus
  95. }
  96. #endif
  97.  
  98. #endif
  99.